#include "flow_led_task.h"
#include <Arduino.h>

void led_task(void *pvParameters)
{
    pinMode(2, OUTPUT);
    while (1)
    {
        // 渐亮
        for (int i = 0; i < 256; i++)
        {
            analogWrite(2, i);
            vTaskDelay(10);
        }
        // 渐灭
        for (int i = 255; i >= 0; i--)
        {
            analogWrite(2, i);
            vTaskDelay(10);
        }
    }
}
